<!--患者信息-->
<template>
  <div class="patientInfomation">
    <el-form :inline="true" :model="formInline" class="demo-form-inline" label-position="left">
      <el-form-item label="患者姓名:">
        <el-text>{{formInline.patient_name}}</el-text>
      </el-form-item>
      <el-form-item label="患者性别:">
        <el-text>{{formInline.patient_sex}}</el-text>
      </el-form-item>
      <el-form-item label="患者年龄:">
        <el-text>{{formInline.patient_age}}</el-text>
      </el-form-item>
      <el-form-item label="手机号:">
        <el-text>{{formInline.patient_mobile}}</el-text>
      </el-form-item>
      <el-form-item label="证件类型:">
        <el-text>{{formInline.idcard_type_text}}</el-text>
      </el-form-item>
      <el-form-item label="证件号:">
        <el-text>{{formInline.idcard}}</el-text>
      </el-form-item>
    </el-form>
  </div>
</template>

<script setup>
  import {ref,nextTick,onMounted,reactive} from 'vue'
  import {orderPatient} from '/src/api/orderManage/recipeOrder'
  const formInline = ref({})
  const props = defineProps({
    prescriptionOrderId: { type: String }
  })
  //订单信息
  const getOrderPatient = async () => {
    try {
      console.log(props.prescriptionOrderId)
      const result = await orderPatient({id:props.prescriptionOrderId})
      console.log('订单', result)
      if (result.code == 200) {
        console.log('订单',result.data)
        formInline.value=result.data
      }
    } catch (error) {
      console.error('获取列表时出错：', error)
    }
  }
  onMounted(() => {
    getOrderPatient()
  });
</script>

<style lang="scss" scoped>
  .demo-form-inline {
    width: 100%;
    margin-top: 20px;
  }

  .demo-form-inline ::v-deep .el-form-item {
    width: 33.33%;
    margin-right: 0px !important;
    margin-bottom: 0 !important;
    font-weight: 300;
  }

  ::v-deep .el-form-item__label {
    color: rgba(0, 0, 0, .85)
  }

  .itemCol {
    width: 100% !important;
  }
</style>